<div id="center_tieude">
  <img class="hinhds" src="./Picture/news/icon.png"   />
  <h3>Tin tức mới nhất</h3>        
</div> <!--end center_tieude-->
<div id="center_tintuc"> 
	<div class="center">
         <div id="center_tintuc">
<?php
	if(isset($_GET['trang']))
	{
	$page=$_GET['trang'];
	$arr=tintuc::GetAll($page,7);
	for($i=0;$i<count($arr);$i++)     
	{    
	?>  	
        <div class="center_news">
              <img src="<?php echo $arr[$i]->HinhAnh;?>" />
              <p><?php echo $arr[$i]->MoTa;?></p>
              <span><a href="./index.php?obj=tintuc&tt=<?php echo $arr[$i]->idTinTuc;?>"><img src="./Picture/news/more.gif" alt="Xem thêm"/></a></span>       
         </div>
  <?php
	}
	}
	else
		if(!isset($_GET['trang']))
		{
			$page=1;
			$arr=tintuc::GetAll($page,7);
			for($i=0;$i<count($arr);$i++)     
			{    
			?>  	
		  <div class="center_news">
              <img src="<?php echo $arr[$i]->HinhAnh;?>" />
              <p><?php echo $arr[$i]->MoTa;?></p>
              <span><a href="./index.php?obj=tintuc&tt=<?php echo $arr[$i]->idTinTuc;?>"><img src="./Picture/news/more.gif" alt="Xem thêm"/></a></span>       
         </div>
          <?php
			}
		}
	?>
    </div>
    	</div>
</div>
<div id="trang">
	<?php
		if(!isset($_GET["trang"]))
			$_GET["trang"]=1;
		if(isset($_GET["obj"])&&$_GET["obj"]='tintuc')
		{
		$a = tintuc::CountTinTuc();
		$sotrang = ceil($a/7);
		$hientai = $_GET["trang"];
			for ($page = 1;(int)$page<=$sotrang;$page++ )
			{
				if($hientai != $page)
				{ echo "
					<a href='index.php?obj=tintuc&trang=$page'>$page</a>";
				}
				else
				{
					echo "<b>".$page."</b>";
				}
			}
		}
		
?>
</div>